package com.patterns.mediator;

public class Test {
	public static void main(String[] args) {
		Mediator m = new PresidentMediator();//总经理
		
		Department development = new DevelopmentDepartment(m);//研发部
		Department finacial = new FinacialDepartment(m);//财务部
		Department market = new MarketDevelopment(m);//市场部
		
		development.outerAction();//研发部给总经理要工资
		market.outerAction();//市场部给总经理要软件
		finacial.outerAction();//财务部给总经理说公司没钱了
	}
}
